﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using corpus_platform.ViewModels;
using corpus_platform.Data;

namespace corpus_platform.ViewModels.Converter
{
    class BindingTreeNodeType2String : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            BindingTreeNodeType type = (BindingTreeNodeType)value;
            switch(type)
            {
                case BindingTreeNodeType.frameElement: return "frameElement";
                case BindingTreeNodeType.framework: return "framework";
                case BindingTreeNodeType.frameworkInstance: return "frameworkInstance";
                case BindingTreeNodeType.ontology: return "ontology";
                case BindingTreeNodeType.root: return "root";
                default: throw (new Exception("can't find type of bindingTreeNode"));
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
